package designMode.decorator.cbf4life;

/**
 * Created by jingqing.zhou on 2015/4/29.
 * 家长类，要来看成绩单并签字的
*/
public class Father {
    public static void main(String[] args) {
        //将成绩单拿过去
        RealSchoolReport realSchoolReport = new RealSchoolReport();
        //看成绩单
        realSchoolReport.report();
        //暴打一顿。。。。

        //以上明显不行，我们需要装饰一翻 如下：
        SugarRealSchoolReport sugarRealSchoolReport = new SugarRealSchoolReport();
        sugarRealSchoolReport.report();
        sugarRealSchoolReport.sign("高兴地签名了");

        //下面是真正的装饰者模式开启了

        SchoolReport rsr = new RealSchoolReport();

        rsr = new HighScoreDecoratorReport(rsr);

        rsr = new HighSortDecoratorReport(rsr);

        rsr.report();;


    }
}
